package cn.topevery.garden.entity.po;

import cn.topevery.garden.entity.serializer.GeometrySerializer;
import cn.topevery.garden.framework.base.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.locationtech.jts.geom.Geometry;

import java.time.LocalDate;
import java.util.List;

/**
 * 项目管理信息表
 *
 * @author code-generate
 * @date 2022-02-15
 */
@Data
@DbTable(tableName = "t_project_management")
public class ProjectManagement extends BaseEntity {
        /**
     * 项目编码
     */
    @DbTableField(columnName = "c_project_code", dbType = DbTypeEnum.VARCHAR)
    public String projectCode ;

    /**
     * 项目名称
     */
    @DbTableField(columnName = "c_name", dbType = DbTypeEnum.VARCHAR)
    public String name ;

    /**
     * 甲方单位
     */
    @DbTableField(columnName = "c_party_a", dbType = DbTypeEnum.VARCHAR)
    public String partyA ;

    /**
     * 甲方负责人
     */
    @DbTableField(columnName = "c_principal_a", dbType = DbTypeEnum.VARCHAR)
    public String principalA ;

    /**
     * 甲方联系方式
     */
    @DbTableField(columnName = "c_telephone_a", dbType = DbTypeEnum.VARCHAR)
    public String telephoneA ;

    /**
     * 乙方单位
     */
    @DbTableField(columnName = "c_party_b", dbType = DbTypeEnum.VARCHAR)
    public String partyB ;

    /**
     * 乙方负责人
     */
    @DbTableField(columnName = "c_principal_b", dbType = DbTypeEnum.VARCHAR)
    public String principalB ;

    /**
     * 乙方联系方式
     */
    @DbTableField(columnName = "c_telephone_b", dbType = DbTypeEnum.VARCHAR)
    public String telephoneB ;

    /**
     * 第三方单位
     */
    @DbTableField(columnName = "c_party_c", dbType = DbTypeEnum.VARCHAR)
    public String partyC ;

    /**
     * 第三方负责人
     */
    @DbTableField(columnName = "c_principal_c", dbType = DbTypeEnum.VARCHAR)
    public String principalC ;

    /**
     * 第三方联系方式
     */
    @DbTableField(columnName = "c_telephone_c", dbType = DbTypeEnum.VARCHAR)
    public String telephoneC ;

    /**
     * 项目状态 0 在建 1 维护 3 结束 
     */
    @DbTableField(columnName = "c_project_status", dbType = DbTypeEnum.INTEGER)
    public Integer projectStatus ;

    /**
     * 项目类型 1 新建项目 2 维护项目 
     */
    @DbTableField(columnName = "c_project_type", dbType = DbTypeEnum.INTEGER)
    public Integer projectType ;

    /**
     * 建设开始时间
     */
    @DbTableField(columnName = "c_start_date", dbType = DbTypeEnum.DATE)
    public LocalDate startDate ;

    /**
     * 建设开始时间
     */
    @DbTableField(columnName = "c_end_date", dbType = DbTypeEnum.DATE)
    public LocalDate endDate ;

    /**
     * 项目内容描述
     */
    @DbTableField(columnName = "c_desc", dbType = DbTypeEnum.VARCHAR)
    public String desc ;

    /**
     * 附件
     */
    @DbTableField(columnName = "c_file_url", dbType = DbTypeEnum.VARCHAR)
    public String fileUrl ;

    @ApiModelProperty(value = "附件")
    private List<ProjectManagementFile> fileList;

    /**
     * 计算空间数据
     */
    @DbTableField(columnName = "c_geo_wkt", dbType = DbTypeEnum.VARCHAR)
    public String geoWkt ;

    /**
     * 图层名称
     */
    @DbTableField(columnName = "c_obj_name", dbType = DbTypeEnum.VARCHAR)
    public String objName ;

    @DbTableField(columnName = "c_address", dbType = DbTypeEnum.VARCHAR)
    private String address;

    @DbTableField(columnName = "c_lng", dbType = DbTypeEnum.FLOAT)
    private Float lng;

    @DbTableField(columnName = "c_lat", dbType = DbTypeEnum.FLOAT)
    private Float lat;

    /**
     * 范围
     */
    @DbTableField(columnName = "c_map_ranges", dbType = DbTypeEnum.OTHER)
    @JSONField(serializeUsing = GeometrySerializer.class, deserializeUsing = GeometrySerializer.class)
    public Geometry mapRanges ;

}
